<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%-- 
    Document   : index
    Created on : 15-feb-2013, 17:14:07
    Author     : Emmanuel
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Busqueda Peliculas</title>
         <style type="text/css"> 
             h1 {font-size:24px;
                 font-family:Algerian;
                 text-align: center;
             } 
             body {
                 font-size: 20px;
                 font-family: Algerian;
                 color: white; 
                 text-decoration-line: red;
             }
             form {
                 
                 font-size: 14px;
                 font-family: Algerian;
             }
 
             </style>
    </head>
    <body background="fondo1.jpg">
        <h1>Base de Datos de Peliculas</h1>
    <center>
        <form action="busqueda.ugb" method="POST">
            Ingrese el nombre de la Pelicula que desea Buscar: <input type="text" name="nombreLike" value="" size="50" />
            
            <br><br>
            <input type="submit" value="Buscar" />
        
        
        
        
        </form>
   
        <br><br>
        
        <table border="1" width="1" cellspacing="1" cellpadding="1">
            <thead>
                <tr>
                    <th>id_pelicula</th>
                    <th>nombre_pelicula</th>
                    <th>actor_principal</th>
                    <th>director_pelicula</th>
                    <th>genero_pelicula</th>
                    <th>duracion_pelicula</th>
                </tr>
            </thead>
            <tbody>
                
            <c:forEach var="pelicula" items="${respuesta}">
                
                 <tr>
                    <td>${pelicula.id_pelicula}</td>
                    <td>${pelicula.nombre_pelicula}</td>
                    <td>${pelicula.actor_principal}</td>
                    <td>${pelicula.director_pelicula}</td>
                    <td>${pelicula.genero_pelicula}</td>
                    <td>${pelicula.duracion_pelicula}</td>
                </tr>
                 <c:remove scope="session" var="respuesta"/>
            </c:forEach>
                
                <c:if test="${not empty error}">
                    <tr>    
                <td colspan="6">${error}</td>
                    </tr>
                    <c:remove scope="session" var="error"/>
                </c:if>
                
                
               
            </tbody>
        </table>
 </center>
        
    </body>
</html>
